The present invention relates to an automatic gain control apparatus and a method of automatically regulating an input gain by means of a digital signal processor (hereinafter, referred to as "DSP").
The automatic gain control (hereinafter, referred to as "AGC") is adopted in various fields such as audio instruments for maintaining constantly a level of an output signal while a level of an input signal fluctuates. The conventional AGC apparatus utilizes a feedback loop operative such as to detect an error between the input signal level and a given target value and to vary an attenuation factor of a volume controller or to vary a gain of a variable amplifier in order to reduce the detected error to thereby maintain the output signal level at the target value.
FIG. 10 is a block diagram showing an example of the conventional AGC apparatus. In the figure, the conventional apparatus is comprised of a volume controller 1 having an analog circuit construction, which processes an analog input signal to suppress a level fluctuation thereof to thereby produce an output signal having a constant level. The output signal of the volume controller 1 is partly circulated to a feedback loop through a rectifier 2 which effects full-wave rectification so that the signal is converted from a voltage form into an energy form. In case that the rectifier 2 and subsequent circuits are composed of a digital structure, an A/D converter may be provided at a preceding stage of the rectifier 2 such that a digitalized signal may be fed to the digital rectifier 2. In this case, the rectifier 2 operates to discriminate a polarity of the inputted digital signal so as to invert a negative portion of the signal while passing a positive portion as it is, thereby outputting the digitally rectified signal.
A pair of counters 3A, 3B of different operation modes are provided to count the rectified digital signal independently from each other. These counters 3A, 3B function as an integrator operative to count an input value in terms of the input energy while sequentially subtracting a given constant target value in terms of a target energy from the input value to thereby accumulate a subtracted value every given sample timing for a predetermined period. In this case, for example, the same accumulation period is set for each of the counters 3A and 3B, while a relatively longer or slower sample timing is set in the counter 3A and a relatively shorter or faster sample timing is set in the other counter 3B. Thus, the slow counter 3A having a relatively small accumulation cycle number is utilized to detect a relatively great scale of the error as compared to the other fast counter 3B having a relatively great accumulation cycle number in the same accumulation period.
FIG. 11 is a graph of a typical characteristic curve showing the relation between the error value and a compensation value. The fast counter 3B covers a limited region C3 to detect a small scale of the error. In the illustrated case, the compensation value is set to zero in the limited region C3. On the other hand, the slow counter 3A covers extended regions C2, C4 to detect a great scale of the error, and the compensation value increases according to the error value.
Referring back to FIG. 10, a pair of window comparators 4A and 4B are connected to the counters 3A and 3B, respectively, to judge as to where the counted value of these counters 3A and 3B falls among the five regions C1-C5 shown in FIG. 11. A compensation coefficient selector 5 is provided to operate according to the judgment of the window comparators 4A, 4B for selectively outputting one of five compensation coefficients including the zero compensation coefficient. An accumulator 6 receives an inverted one of the selected compensation coefficient so as to control the attenuation factor of the volume controller 1.
The above mentioned conventional AGC apparatus has the following drawbacks:
(1) When the AGC is tuned to closely and finely regulate the input signal around a given target energy value, the AGC may suffer from reduction in response speed, thereby failing to follow an overall level shift. PA0 (2) In turn, when the AGC is tuned to quickly follow the overall level shift, an input volume value may oscillate adversely around the target energy value. PA0 (3) In order to vary the compensation coefficient more finely in response to a deviation of the input signal from the target energy value, additional hardware components are required for detecting varying points and for adjusting parameters. PA0 (4) Since the conventional circuit has a hard logic construction, it might be difficult to change parameters. PA0 (5) Many hardware components are required for constructing an efficient AGC apparatus.